package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * 短信下发记录对象 rnx_sms_send_log
 * 
 * @author ruoyi
 * @date 2022-05-12
 */
public class RnxSmsSendLog extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    /** 签名 */
    @Excel(name = "签名")
    private String signName;

    /** 模板 */
    @Excel(name = "模板")
    private String template;

    /** 参数 */
    @Excel(name = "参数")
    private String email;

    /** 下发时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@Excel(name = "下发时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date sendTime;

    /** 状态 1成功 0失败 */
    @Excel(name = "状态 1成功 0失败")
    private Long state;

    /** 失败原因 */
    @Excel(name = "失败原因")
    private String errorDesc;

    /** 扩展字段 */
    @Excel(name = "扩展字段")
    private String ext;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }
    public void setSignName(String signName) 
    {
        this.signName = signName;
    }

    public String getSignName() 
    {
        return signName;
    }
    public void setTemplate(String template) 
    {
        this.template = template;
    }

    public String getTemplate() 
    {
        return template;
    }
    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }
    public void setSendTime(Date sendTime) 
    {
        this.sendTime = sendTime;
    }

    public Date getSendTime() 
    {
        return sendTime;
    }
    public void setState(Long state) 
    {
        this.state = state;
    }

    public Long getState() 
    {
        return state;
    }
    public void setErrorDesc(String errorDesc) 
    {
        this.errorDesc = errorDesc;
    }

    public String getErrorDesc() 
    {
        return errorDesc;
    }
    public void setExt(String ext) 
    {
        this.ext = ext;
    }

    public String getExt() 
    {
        return ext;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("phone", getPhone())
            .append("signName", getSignName())
            .append("template", getTemplate())
            .append("email", getEmail())
            .append("sendTime", getSendTime())
            .append("state", getState())
            .append("errorDesc", getErrorDesc())
            .append("ext", getExt())
            .toString();
    }
}
